//log
eclipse.runtime.include("../log/log.eclipse.js");
log.log('include property');

/**
 * 属性对象
 */
var Property = function(name, value) {
	this.name = name;
	this.value = value;
};

/**
 * 设置属性名
 * 
 * @param {String}
 *            name
 */
Property.prototype.setName = function(name) {
	return this.name = name;
};

/**
 * 获取属性名
 */
Property.prototype.getName = function() {
	return this.name;
};

/**
 * 设置属性值
 * 
 * @param {String}
 *            value
 */
Property.prototype.setValue = function(value) {
	return this.value = value;
};

/**
 * 获取属性值
 */
Property.prototype.getValue = function() {
	return this.value;
};

/**
 * 属性拼装
 */
Property.prototype.toString = function() {
	if (this.name != null) {
		return this.name + '=' + '"' + (this.value == null ? '' : this.value)
				+ '"';
	}
};
